You are here: Modules > Differences for PDF Output > Creating Context-Sensitive Cross-References for PDF Output

Creating Context-Sensitive Cross-References for PDF Output

Cross-references to other topics may look different depending on whether they appear in online or print output. By editing the MadCap|xref.ConceptPageNumber style class in the stylesheet, you can set up your project so that cross-references appear as links in HTML5 output and as page references in PDF output. These cross-references are context-sensitive based on the location of the topic they are referencing. Therefore they may say “see [topic] below,” “see [topic] on the next page,” or “see [topic]” on a certain page, depending on the location of the topic.

  1. Open the main stylesheet from the Project Organizer.
  2. Select Switch To Advanced View if the stylesheet appears in the Simplified View.
  3. Locate the MadCap | xref basic selector.
  4. Click the arrow next to the basic selector to expand the list of style classes associated with it.
  5. Select the ConceptPageNumber style class.
  6. Select Show: Set Properties in the drop-down menu on the right of the Stylesheet Editor toolbar.
  7. Type mc-format in the Add Property field.
  8. Press enter.
  9. Click the ellipsis next to the field containing "{para}"
  10. Type {quote}{para}{quote} {pageref} in the field below "Enter format (preview below)."
  11. Click OK.
  12. Save the stylesheet to apply the changes.

This is an example of a cross-reference as it appears in the XML Editor.

This is the same cross-reference that is pictured above as it appears in a PDF output after editing the MadCap|xref.ConceptPageNumber style class.